<?php

class Country_Model_DbTable_Videos extends Engine_Db_Table
{
  protected $_rowClass = 'Country_Model_Video';
  
  
    public function getSellectAllVideoOfCountry($country_id){
        $video = Engine_Api::_()->getDbtable('videos','country');
        $aVideo = Engine_Api::_()->getDbtable('videos','video');
        
        $select = $aVideo->select()
                         ->setIntegrityCheck(false)
                         ->from($aVideo->info('name'),"*")
                         ->join($video->info('name'),$video->info('name').".v_id = ".$aVideo->info('name').".video_id",null)
                         ->where($video->info('name').".country_id = $country_id");
                        
        return $select;
    }
}
